#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main()
{
    char letter = "\0";
    while (scanf("%c", &letter) != EOF)
    {
        getchar();
        if (letter >= 65 && letter <= 90)
        {
            letter += 32;
            printf("%c\n", letter);
        }
        else if (letter >= 97 && letter <= 122)
        {
            letter -= 32;
            printf("%c\n", letter);
        }
    }
    return 0;
}